<template>
  <div class="category">
    <store-category v-model="category" @change="changeCategory" />
  </div>
</template>
<script>
export default {
  name: 'category',
  data () {
    return {
    };
  },
  props: {
    category: {
      type: Array
    }
  },
  created () {
  },
  methods: {
    changeCategory (data) {
      console.log(data);
      this.$router.push({ 'path': '/mall/list', query: { shopCatId: data.id } });
      // this.$parent.stroeCategory(data);
    }
  }
};
</script>
<style lang="less" scoped>
.category {
  padding: 0 25px;
  .list {
    line-height: 88px;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    padding: 0 20px 0 47px;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    .name {
      font-size: 28px;
      color: #000;
      position: relative;
      font-weight: 800;
      &::before {
        content: '';
        display: block;
        width: 3px; /*no*/
        height: 26px;
        background: #ff0034;
        border-radius: 3px;
        position: absolute;
        left: -20px;
        top: 30px;
      }
    }
    .arrow-right {
      width: 15px;
      height: 25px;
      background-image: url('/static/img/icon-arrow-right.png');
      background-repeat: no-repeat;
      background-size: cover;
      background-position: left top;
    }
  }
}
</style>
